<?php
	
	if(!@$_POST['akses'] == true) {
	   die('Akses langsung tidak diperbolehkan!');
	}
	  
    include("dboper.php");

    $id = $_POST['idAsisten'];	

    $asisten = getOneAsisten($id);

?>
<h4>Ubah Data Asisten</h4>
<form id="formAddAsisten" method="POST" enctype="multipart/form-data" action="proseditasisten.php">
	<table>
		<tr><td></td><td>
            <input type="hidden" value="true" name="akses">
            <input type="hidden" value="<?php echo $asisten['idAsisten']; ?>" name="idAsisten">
            <input type="hidden" value="<?php echo $asisten['Foto']; ?>" name="fotoLama">
        </td></tr>
		<tr><td>Nama Lengkap</td><td><input required="" type="text" name="txtNama" value="<?php echo $asisten['Nama']; ?>"></td></tr>
		<tr><td>Panggilan</td><td><input required="" type="text" name="txtPanggilan" value="<?php echo $asisten['namaPanggilan']; ?>"></td></tr>
		<tr><td>NIM</td><td><input required="" type="text" name="txtNIM" value="<?php echo $asisten['NIM']; ?>"></td></tr>
		<tr><td>Foto Lama</td><td><img src="../imagedata/<?php echo $asisten['Foto']; ?>" width="100px"></td></tr>
		<tr><td>Foto Baru</td><td><input type="hidden" name="txtFotoLama" value="../imagedata/<?php echo $asisten['Foto']; ?>" /><input type="file" name="txtFoto" >&nbsp; *abaikan jika tidak ada perubahan foto.</td></tr>
		<tr><td></td><td><input type="submit" value="Simpan"></td></tr>
	</table>
</form>
